package com.yungui.rabbitmq.mq.rabbitmq.config;

import com.yungui.rabbitmq.entity.LoggerInfoUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.*;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitAdmin;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Map;

@Configuration
public class RabbitMQConfig {
    Logger logger = LoggerFactory.getLogger(getClass());
    @Bean
    public Queue queueMessage() {
        logger.info("{}",LoggerInfoUtil.getInstance().buildLoggerInfo("title","初始化队列"));
        return new Queue("wangyun_test_queue",true,false,false);
    }
}